package com.lxd.entity.po;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Date;
import com.lxd.entity.enums.DateTimePatternEnum;
import com.lxd.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;


/**
 * 评论表
 */
public class Comment implements Serializable {


	/**
	 * 评论ID
	 */
	private Long id;

	/**
	 * 评论人ID
	 */
	private Long userId;

	/**
	 * 评论的新闻ID
	 */
	private Long newsId;

	/**
	 * 评论的活动ID
	 */
	private Long activityId;

	/**
	 * 评论内容
	 */
	private String content;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createdAt;

	/**
	 * 更新时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updatedAt;


	private Long likeCount;
	/**
	 * 评论状态 1:展示 0:隐藏
	 */
	private Integer status;

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	public Long getLikeCount() {
		return likeCount;
	}

	public void setLikeCount(Long likeCount) {
		this.likeCount = likeCount;
	}

	public void setId(Long id){
		this.id = id;
	}

	public Long getId(){
		return this.id;
	}

	public void setUserId(Long userId){
		this.userId = userId;
	}

	public Long getUserId(){
		return this.userId;
	}

	public void setNewsId(Long newsId){
		this.newsId = newsId;
	}

	public Long getNewsId(){
		return this.newsId;
	}

	public void setActivityId(Long activityId){
		this.activityId = activityId;
	}

	public Long getActivityId(){
		return this.activityId;
	}

	public void setContent(String content){
		this.content = content;
	}

	public String getContent(){
		return this.content;
	}

	public void setCreatedAt(Date createdAt){
		this.createdAt = createdAt;
	}

	public Date getCreatedAt(){
		return this.createdAt;
	}

	public void setUpdatedAt(Date updatedAt){
		this.updatedAt = updatedAt;
	}

	public Date getUpdatedAt(){
		return this.updatedAt;
	}

	@Override
	public String toString (){
		return "评论ID:"+(id == null ? "空" : id)+"，评论人ID:"+(userId == null ? "空" : userId)+"，评论的新闻ID:"+(newsId == null ? "空" : newsId)+"，评论的活动ID:"+(activityId == null ? "空" : activityId)+"，评论内容:"+(content == null ? "空" : content)+"，创建时间:"+(createdAt == null ? "空" : DateUtil.format(createdAt, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()))+"，更新时间:"+(updatedAt == null ? "空" : DateUtil.format(updatedAt, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()));
	}
}
